import { defHttp } from '/@/utils/http/axios';

/**
 * 首页
 * @param params
 */
export const dashboardTop = (params) => {
    return defHttp.get({ url: '/dashboard/top', params });
};

export const dashboardLeftBottom = (params) => {
    return defHttp.get({ url: '/dashboard/leftBottom', params });
};

export const dashboardRightBottom = (params) => {
    return defHttp.get({ url: '/dashboard/rightBottom', params });
};


export const getNoticeConfigDictList = (params) => {
    return defHttp.get({ url: '/dictCommon/getNoticeConfigDictList', params });
};

export const getDictList = (params) => {
    return defHttp.get({ url: '/dictCommon/getDictList', params });
};

export const getModelListByProductId = (params) => {
    return defHttp.get({ url: '/dictCommon/getModelListByProductId', params })
}

export const getTemplateList = (params) => {
    return defHttp.get({ url: '/dictCommon/getTemplateId', params });
};


/**
 * 充电监控
 * @param params
 */
export const connectorList = (params) => {
    return defHttp.get({ url: '/dashboard/connectorList', params });
};

/**
 * 大地图设备展示
 * @param params
 */
export const getEquipList = (params) => {
    return defHttp.get({ url: '/map/device/list', params });
};

/**
 * 大地图展示上方
 * @param params
 */
export const mapTop = (params) => {
    return defHttp.get({ url: '/map/device/statics', params });
};

/**
 * 运营商下拉框
 * @param params
 */
export const getOperatorList = (params) => {
    return defHttp.get({ url: '/dictCommon/getOrgCodeList', params });
};

/**
 * 产品下拉框
 * @param params
 */
export const getProductList = (params) => {
    return defHttp.get({ url: '/dictCommon/getProductListByOrgCode', params });
};

/**
 * 设备下拉框
 * @param params
 */
export const getEquipmentDictList = (params) => {
    return defHttp.get({ url: '/dictCommon/getEquipmentDictList', params });
};


/**
 * 监控列表左侧树形下拉框
 * @param params
 */
export const getCameraTreeList = (params) => {
    return defHttp.get({ url: '/dictCommon/getCameraTreeList', params });
};

/**
 * 设置功率列表
 * @param params
 */
export const getConnectorPowerList = () =>
    defHttp.get({
        url: '/station/equipmentInfo/getConnectorPowerList',
        params: {
            equipmentId: sessionStorage.getItem("equipmentId")
        },
    });

/**
* 修改功率列表
* @param params
*/
export const updateConnectorPowerList = (params) =>
    defHttp.post({
        url: '/station/equipmentInfo/updateConnectorPowerList',
        params,
    });


/**
* 摄像头树状图
* @param params
*/
export const getCameraData = (params) =>
    defHttp.post({
        url: '/device/deviceInfo/getCameraData',
        params,
    });



